<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- <%@ include file="/WEB-INF/component/commonTagLib.jsp" %> --%>

<!DOCTYPE html>
<html>
<head>
    <title>输入密码</title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp" %>
    <link href="${ctx}/lib/plugins/zTree_v3/css/zTreeStyle/zTreeStyle.css" rel="stylesheet" /> 
</head>
<body class="skin-blue sidebar-mini fixed skin-blue-light-frame">
    <section class="content">
        <div class=" box box-success ">
            <form role="form" id="form" class="form-horizontal" action="validatePassword.html" method="post">
                <div class="box-body">
                    <div class="form-group form-group-xs">
                    <input type="hidden" name="projId" id="projId" value="${projId }"/>
                        			<div class="form-group form-group-xs">
				                        <label for="newpassword" class="col-sm-2 text-right">密码:</label>
					                        <div class="col-sm-4 text-left">
					                            <input class="form-control" id="password" name="password" placeholder="密码" type="password">
					                        </div>
			                    	</div>
                        			<div class="form-group form-group-xs" style=" height:12px;padding-left:160px;color:red;">
				                    	<div id="msgdiv" class=''> </div>
				                    </div>
                        		
                  </div>
                    
                </div>
                <div class="box-footer text-center">
                    <button type="button" class="btn btn-success btn-sm" onclick="submitPassword();">确定</button>
                </div>
            </form>
        </div>
    </section>
    
    <%@ include file="/WEB-INF/component/commonJS.jsp" %>
    <script src="${ctx}/lib/plugins/zTree_v3/js/jquery.ztree.all-3.5.min.js"></script>
    
    <script type="text/javascript">
		    function submitPassword() {
				var passwords ="";
				var password = $.trim($("#password").val());
				if (password == null || password == "") {
					$("#msgdiv").html("请输入密码！");
                	$("#msgdiv").attr("class","errorTips fa fa-minus-circle")
					return false;
				}
				
				$('#form').submit(); 
				
			}
		    
		    $('#form').ajaxForm({
	            dataType : "json",
	            timeout: 10000,
	            success : function(result) {
	                if (result.success) {
	                    top.mainframe.document.location = "${ctx}/drugPriceQuote/toDrugPriceQuoteList.html?projId=${projId}&name=${name}";
	                } else {
	                	$("#msgdiv").html(result.msg);
	                	$("#msgdiv").attr("class","errorTips fa fa-minus-circle")
	                   
	                }
	            }
	        }); 
    </script>
    
</body>
</html>
